#include <log4cpp/Category.hh>
#include <log4cpp/PropertyConfigurator.hh>

#include "../src/Constants.h"

static const std::string LoggerInitFileName = "../log4cpp.properties";

class BaseFixture {


public:
  BaseFixture(const std::string& tcHeader) {

    try {
      log4cpp::PropertyConfigurator::configure(LoggerInitFileName);

      log4cpp::Category& logger = log4cpp::Category::getInstance(
          std::string(SERVER_LOGGER));

      logger.info(tcHeader);
    }
    catch(...) {
      std::cout << __func__ << " ERROR : logger property init failed " << LoggerInitFileName << std::endl;
    }
  }

  ~BaseFixture() {
    log4cpp::Category::shutdown();
  }

};
